const path = require("path");

/* 
         > cd /a/b/c
   /a/b/c> cd ../demo
/a/b/demo> cd ./obj/demo1
/a/b/demo/obj/demo1>
*/

const a = "/a/b/c";
const b = "../demo";
const c = "./obj/demo1";
console.log(path.resolve(a, b, c));
